// --------------------------------------------------
// 表单
// @Author: steven.wjx
// @Date:   2020-03-05 13:17:50
// --------------------------------------------------
select::-ms-expand {
	display: none;
}

option::-ms-expand {
	display: none;
}

::-webkit-input-placeholder {
	/* WebKit browsers */
	color: #bbb;
}

:-moz-placeholder {
	/* Mozilla Firefox 4 to 18 */
	color: #bbb;
}

::-moz-placeholder {
	/* Mozilla Firefox 19+ */
	color: #bbb;
}

:-ms-input-placeholder {
	/* Internet Explorer 10+ */
	color: #bbb;
}

.#{$ui-name}form {
	fieldset {
		border: none;
		padding: 10px 15px;
	}

	legend {
		width: 100%;
		font-weight: 600;
		padding-bottom: 10px;
		border-bottom: 1px solid $border-color;
	}

	.#{$ui-name}form-item {
		margin-bottom: 15px;
		@include clearfix;
	}

	.#{$ui-name}form-label {
		display: block;
		font-weight: 600;
		min-width: 80px;
		font-size: ceil($font-size*0.9);
		margin-bottom: 6px;

		.#{$ui-name}form-required {
			color: $danger-color;
			margin-right: 5px;
			font-weight: 900;
		}
	}

	.#{$ui-name}form-input,
	.#{$ui-name}form-select,
	.#{$ui-name}form-textarea {
		display: block;
		width: 100%;
		box-sizing: border-box;
		font-size: ceil(14px*0.9);
		padding: 10px 12px;
		border: 1px solid $border-color;
		background-color: transparent;
		border-radius: $border-radius / 2;
		transition: all .3s ease;
		outline: 0;

		&[disabled] {
			background-color: $disabled-bg;
			cursor: not-allowed;
		}

		&[readonly] {
			background-color: $disabled-bg;
		}

		&:focus {
			border-color: lighten($primary-color, 20%);
			box-shadow: 0 2px 5px rgba(126, 193, 255, 0.4);
		}
	}

	.#{$ui-name}form-select {
		-webkit-appearance: none !important;
		background: #fff url("data:image/svg+xml;charset=UTF-8,%3Csvg%20width%3D%2224%22%20height%3D%2216%22%20viewBox%3D%220%200%2024%2016%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%201%209%206%2015%206%22%20%2F%3E%0A%20%20%20%20%3Cpolygon%20fill%3D%22%23666%22%20points%3D%2212%2013%209%208%2015%208%22%20%2F%3E%0A%3C%2Fsvg%3E%0A") no-repeat 100% center;

		&[multiple] {
			background-image: none;
		}
	}

	.#{$ui-name}form-radio,
	.#{$ui-name}form-check {
		font-size: 13px;
		margin-right: 10px;
		font-weight: normal;

		>input {
			margin-right: 8px;
			font-size: 18px;
			vertical-align: baseline;
		}

		&:first-child {
			padding-left: 0;
		}
	}

	.#{$ui-name}form-textarea {
		min-height: 100px;
		height: auto;
		padding: 6px 10px;
		line-height: 1.56;
		resize: vertical;
	}

	.#{$ui-name}form-static {
		padding: 8px 0;
		line-height: 20px;
		margin-top: 0;
		margin-bottom: 0;
	}

	.#{$ui-name}form-help {
		font-size: 13px;
		color: #999;
		margin-top: 5px;
		margin-bottom: 9px;
	}

	.#{$ui-name}has-success {
		@include form-variant($success-color);
	}

	.#{$ui-name}has-danger {
		@include form-variant($danger-color);
	}

	.#{$ui-name}has-warning {
		@include form-variant($warning-color);
	}

	&.#{$ui-name}form-horizontal {
		.#{$ui-name}form-label {
			box-sizing: border-box;
			line-height: 20px;
			padding: 8px 0;
			padding-right: 15px;
			margin-bottom: 0;
			text-align: right;
		}
	}

	&.#{$ui-name}form-inline {
		.#{$ui-name}form-item {
			@include inline-block;
			margin-bottom: 0;

			.#{$ui-name}form-label {
				@include inline-block;
				min-width: inherit;
				margin-bottom: 0;
			}

			.#{$ui-name}form-input {
				@include inline-block;
				width: auto;
			}

		}
	}
}